<?php

namespace app\api\controller;

use app\common\controller\Api;
use fast\Tree;

class Menu extends Api
{
    protected $noNeedLogin = ["getData","getMenu"];
    protected $noNeedRight = '*';

    public function getMenu(){
//        Tree::instance()->init(\app\common\func\Menu::getMenu());
//        $list = Tree::instance()->getTreeArray(0);

        $this->success("菜单",["1" => \app\common\func\Menu::getMenu(1),"2" => \app\common\func\Menu::getMenu(2)]);
    }

    public function getData(){
        $list = \app\common\func\Menu::getData();

        $this->success("数据显示",$list);
    }
}
